import request from '@/utils/request.js'
// 8081
import {cosnt} from './env';
// 8080
import {thislistindo} from './env'

// 8081
// let cosnt = 'https://t.api.huiweij.com/cms'

// 8080
// let thislistindo = 'https://t.api.huiweij.com/front/api/v1'
// 入住审核列表 8080
export function useraudit(data){
  return request({
   url:thislistindo + '/user/certification/audit/list',
   method:'post',
   data
  })
}
// 通过 8080
export function userpass(data){
  return request({
   url:thislistindo + '/user/certification/audit/pass',
   method:'post',
   data,
     headers: { // 设置请求头
      'Content-Type': 'application/x-www-form-urlencoded'
    }
})
}
// 拒绝8080
export function userdown(data){
  return request({
   url: thislistindo + '/user/certification/audit/reject',
   method:'post',
   data,
   headers: { // 设置请求头
    'Content-Type': 'application/x-www-form-urlencoded'
  }
})
}
// 用户列表 8080
export function userlist(data){
  return request({
   url:thislistindo + '/user/info/list',
   method:'post',
   data,
})
}

// 用户列表冻结 8080
export function userfrost(data){
  return request({
   url:thislistindo + '/user/info/freeze',
   method:'post',
   data,
     headers: { // 设置请求头
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

// 用户列表解冻 8080
export function userthawy(data){
  return request({
   url:thislistindo + '/user/info/un-freeze',
   method:'post',
   data,
     headers: { // 设置请求头
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

// 建议与反馈 8080
export function usersuggest(data){
  return request({
   url:thislistindo + '/other/feedback/list',
   method:'post',
   data
  })
}

// 版本列表 8081
export function userversions(data){
  return request({
   url:cosnt + '/version/list',
   method:'post',
   data,
   
  })
}
// 版本添加 8081  
export function userversionsadd(data){
  return request({
   url:cosnt + '/version/add',
   method:'post',
   data,
   
  })
}
 
// 版本删除 8081
export function userversionsdelete(id){
  return request({
   url:cosnt + '/version/delete/' + id,
   method:'post', 
  })
}
// 邀请列表 8080
export function userInvite(data){
  return request({
   url:thislistindo + '/user/share/list',
   method:'post', 
   data
  })
}
// 邀请新用户明细 8080
export function userdetail(data){
  return request({
   url:thislistindo + '/user/share/detail',
   method:'post', 
   data
  })
}
  // 定制服务
  export function userserve(data){
    return request({
     url:thislistindo + '/service/list/manger',
     method:'post', 
     data
    })
  }
  // 首页轮播图分页
  export function userbanner(data){
    return request({
     url:thislistindo + '/index/banner/page',
     method:'post', 
     data
    })
  }
   // 首页轮播图新增
   export function banneradd(data){
    return request({
     url:thislistindo + '/index/banner/create',
     method:'post', 
     data
    })
  }
     // 首页轮播图编辑
     export function bannerupdate(data){
      return request({
       url:thislistindo + '/index/banner/update',
       method:'post', 
       data
      })
    }
         // 首页轮播图删除
    export function bannerremove(data){
     return request({
      url:thislistindo + '/index/banner/remove',
      method:'post', 
      data
     })
   }
   // 首页轮播图关闭
   export function bannerclose(data){
     return request({
      url:thislistindo + '/index/banner/enable',
      method:'post', 
      data
     })
   }
      // 首页轮播图开启
      export function banneropen(data){
        return request({
         url:thislistindo + '/index/banner/disable',
         method:'post', 
         data
        })
      }
      // 一级分类列表
      export function ification(){
        return request({
          url:thislistindo +'/commodity/category/all/top',
          method:'get', 
        })
      }
        // 分类列表
      export function classification(){
        return request({
          url:thislistindo +'/commodity/category/all',
          method:'get', 
        })
      }
      // 新增分类
      export function fication(data){
        return request({
          url:thislistindo +'/commodity/category/create',
          method:'post', 
          data
        })
      }
      // 编辑分类
      export function redact(data){
        return request({
          url:thislistindo +'/commodity/category/update',
          method:'post', 
          data
        })
      }
      // 删除分类
      export function xdelete(data){
        return request({
          url:thislistindo +'/commodity/category/remove',
          method:'post', 
          data,
          headers: { // 设置请求头
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        })
      }
      // 根据店铺二级分类
           export function second(){
            return request({
              url:thislistindo +'/commodity/category/shop',
              method:'get', 
            })
          }